3.7 \(\int \frac{\csc (x)}{a-a \cos ^2(x)} \, dx\)

Optimal. Leaf size=22 \[ -\frac{\tanh ^{-1}(\cos (x))}{2 a}-\frac{\cot (x) \csc (x)}{2 a} \]

[Out]

-ArcTanh[Cos[x]]/(2*a) - (Cot[x]*Csc[x])/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.0439701, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3175, 3768, 3770} \[ -\frac{\tanh ^{-1}(\cos (x))}{2 a}-\frac{\cot (x) \csc (x)}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]/(a - a*Cos[x]^2),x]

[Out]

-ArcTanh[Cos[x]]/(2*a) - (Cot[x]*Csc[x])/(2*a)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\csc (x)}{a-a \cos ^2(x)} \, dx &=\frac{\int \csc ^3(x) \, dx}{a}\\ &=-\frac{\cot (x) \csc (x)}{2 a}+\frac{\int \csc (x) \, dx}{2 a}\\ &=-\frac{\tanh ^{-1}(\cos (x))}{2 a}-\frac{\cot (x) \csc (x)}{2 a}\\ \end{align*}

Mathematica [B]  time = 0.0079475, size = 51, normalized size = 2.32 \[ \frac{-\frac{1}{8} \csc ^2\left (\frac{x}{2}\right )+\frac{1}{8} \sec ^2\left (\frac{x}{2}\right )+\frac{1}{2} \log \left (\sin \left (\frac{x}{2}\right )\right )-\frac{1}{2} \log \left (\cos \left (\frac{x}{2}\right )\right )}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]/(a - a*Cos[x]^2),x]

[Out]

(-Csc[x/2]^2/8 - Log[Cos[x/2]]/2 + Log[Sin[x/2]]/2 + Sec[x/2]^2/8)/a

________________________________________________________________________________________

Maple [B]  time = 0.034, size = 44, normalized size = 2. \begin{align*}{\frac{1}{4\,a \left ( 1+\cos \left ( x \right ) \right ) }}-{\frac{\ln \left ( 1+\cos \left ( x \right ) \right ) }{4\,a}}+{\frac{1}{4\,a \left ( \cos \left ( x \right ) -1 \right ) }}+{\frac{\ln \left ( \cos \left ( x \right ) -1 \right ) }{4\,a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)/(a-a*cos(x)^2),x)

[Out]

1/4/a/(1+cos(x))-1/4/a*ln(1+cos(x))+1/4/a/(cos(x)-1)+1/4/a*ln(cos(x)-1)

________________________________________________________________________________________

Maxima [B]  time = 0.948883, size = 50, normalized size = 2.27 \begin{align*} \frac{\cos \left (x\right )}{2 \,{\left (a \cos \left (x\right )^{2} - a\right )}} - \frac{\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{\log \left (\cos \left (x\right ) - 1\right )}{4 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a-a*cos(x)^2),x, algorithm="maxima")

[Out]

1/2*cos(x)/(a*cos(x)^2 - a) - 1/4*log(cos(x) + 1)/a + 1/4*log(cos(x) - 1)/a

________________________________________________________________________________________

Fricas [B]  time = 1.89224, size = 153, normalized size = 6.95 \begin{align*} -\frac{{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 2 \, \cos \left (x\right )}{4 \,{\left (a \cos \left (x\right )^{2} - a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a-a*cos(x)^2),x, algorithm="fricas")

[Out]

-1/4*((cos(x)^2 - 1)*log(1/2*cos(x) + 1/2) - (cos(x)^2 - 1)*log(-1/2*cos(x) + 1/2) - 2*cos(x))/(a*cos(x)^2 - a
)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\csc{\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a-a*cos(x)**2),x)

[Out]

-Integral(csc(x)/(cos(x)**2 - 1), x)/a

________________________________________________________________________________________

Giac [B]  time = 1.15986, size = 51, normalized size = 2.32 \begin{align*} -\frac{\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{\log \left (-\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{\cos \left (x\right )}{2 \,{\left (\cos \left (x\right )^{2} - 1\right )} a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a-a*cos(x)^2),x, algorithm="giac")

[Out]

-1/4*log(cos(x) + 1)/a + 1/4*log(-cos(x) + 1)/a + 1/2*cos(x)/((cos(x)^2 - 1)*a)